<html>
<head>
<link href="../../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>Creation of a Pendulum (7/8)</h3></center>
		<div id="orangeText">Description</div>
         
         <p>To link the two different mechanical objects, we will create a spring between them.</p>
                
         <div id="tutorialAction"><p>Find the <strong>SpringForceField</strong> component. Drag and drop it on the <strong>root</strong> node. The Modeler will warn you  "No MechanicalState found in your Node root". Press <strong>Ignore</strong>. We will define what the ForceField should act on manually.</p>
         
         <p>Double click the new <strong>SpringForceField</strong> to edit its properties. Towards the bottom of the window, in the <strong>First object in interaction</strong> textbox, type "FirstObject". In the <strong>Second object in interaction</strong> textbox, type "SecondObject". </p>
         
         <p>Go to the <strong>Property 2/2</strong> tab, increase the <strong>spring's pairs of indices, stiffness, damping, and rest length</strong> to 1, and press <strong>Display the values</strong>, then <strong>Update</strong>. Fill in "1", "0", "10", "0.1", and "1" in the columns <strong>Index1, Index2, Ks, Kd,</strong> and <strong>L</strong> respectively.</p>
         
         <p>Run the scene in SOFA. Click the <strong>Graph</strong> tab.</p></div>

		<div id="orangeText">Key points</div>

        <p>We use the same component as in the previous part of the tutorial (SpringForceField). But you may notice the the colour used in the SOFA scene graph is not the same. <strong>Internal Springs</strong> use a blue color, while <strong>Interaction Springs</strong> use a red colour. The difference with the previous use of the SpringForceField resides in the fact that we need to specify the two mechanical objects in interaction: we specified the MechanicalObjects <strong>FirstObject</strong> and <strong>SecondObject</strong>. The creation of the springs is exactly the same: two indices, Ks, Kd and rest length. The second spring is displayed in green, representing the interaction between the two objects. </p>

		<div id="orangeText">Results</div>
               
        <p><div id="tutorialAction">To get a better view of the simulation, reduce the integration time step by finding the <strong>DT</strong> textbox on the top left of the SOFA window, and changing it from <strong>0.01</strong>  to "0.001". Press <strong>Animate</strong>.</div></p>

                <br><center><h3><a href="5_Pendulum.scn">Previous</a> ____________  <a href="7_Pendulum.scn">Next</a></center></h3>
	</div>
</body>
</html>
